<!DOCTYPE html>
<!--conf
<sample>
              <product version="4.0b1" edition="std"/>
                     <modifications>
                            <modified date="130911"/>
                     </modifications>
               </sample>
-->
<html>
<head>
	<title>Icons size in tabbar</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		
		var myToolbar;
		var tbIconSize = null;
		var tbXML = "dhxtoolbar_button.xml";
		var myTabbar;
		var myGrid;
		
		function doOnLoad() {
			
			myTabbar = new dhtmlXTabBar("my_tabbar");
			
			myTabbar.addTab("a1","Tab 1-1", null, null, true);
			myTabbar.addTab("a2","Tab 1-2");
			
			//
			myGrid = myTabbar.tabs("a1").attachGrid();
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.loadXML("../common/grid.xml?etc="+new Date().getTime());
			
			myToolbar = myTabbar.tabs("a1").attachToolbar();
			loadToolbar(tbIconSize||18, true);
		}
		
		function loadToolbar(size, force) {
			if (tbIconSize == size && force !== true) return;
			myToolbar.clearAll();
			myToolbar.setIconSize(size);
			myToolbar.setIconsPath("../common/icon_size/dhx_skyblue/"+size+"/");
			myToolbar.loadStruct("../common/"+tbXML);
			tbIconSize = size;
		}
		function setXML(xml) {
			if (tbXML == xml) return;
			tbXML = xml;
			myToolbar.clearAll();
			myToolbar.loadStruct("../common/"+tbXML);
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div style="padding-bottom: 10px;">
		<input type="button" value="18" onclick="loadToolbar(18);">
		<input type="button" value="24" onclick="loadToolbar(24);">
		<input type="button" value="32" onclick="loadToolbar(32);">
		<input type="button" value="48" onclick="loadToolbar(48);">
		&nbsp;&nbsp;&nbsp;
		<input type="button" value="with labels" onclick="setXML('dhxtoolbar_button.xml');">
		<input type="button" value="without labels" onclick="setXML('dhxtoolbar_button2.xml');">
	</div>
	<div id="my_tabbar" style="width:395px; height:390px;"></div>
</body>
</html>